﻿@namespace Blazorise
@inherits BaseComponent
<CascadingValue Value="@this" IsFixed="true">
    <CascadingValue Value="@State">
        @if ( TabPosition == TabPosition.Top )
        {
            @if ( Items != null )
            {
                <ul id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                    @Items
                </ul>
            }
            @if ( Content != null )
            {
                <div class="@ContentClassNames" @attributes="@Attributes">
                    @Content
                </div>
            }
        }
        else if ( TabPosition == TabPosition.Bottom )
        {
            @if ( Content != null )
            {
                <div class="@ContentClassNames" @attributes="@Attributes">
                    @Content
                </div>
            }
            @if ( Items != null )
            {
                <ul id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                    @Items
                </ul>
            }
        }
        else if ( TabPosition == TabPosition.Left )
        {
            <Row>
                <Column ColumnSize="@(VerticalItemsColumnSize ?? ColumnSize.IsAuto)">
                    @if ( Items != null )
                    {
                        <ul id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                            @Items
                        </ul>
                    }
                </Column>
                <Column>
                    @if ( Content != null )
                    {
                        <div class="@ContentClassNames" @attributes="@Attributes">
                            @Content
                        </div>
                    }
                </Column>
            </Row>
        }
        else if ( TabPosition == TabPosition.Right )
        {
            <Row>
                <Column>
                    @if ( Content != null )
                    {
                        <div class="@ContentClassNames" @attributes="@Attributes">
                            @Content
                        </div>
                    }
                </Column>
                <Column ColumnSize="@(VerticalItemsColumnSize ?? ColumnSize.IsAuto)">
                    @if ( Items != null )
                    {
                        <ul id="@ElementId" class="@ClassNames" style="@StyleNames" @attributes="@Attributes">
                            @Items
                        </ul>
                    }
                </Column>
            </Row>
        }
    </CascadingValue>
</CascadingValue>